package com.vlin;

import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.PropertySource;

import com.vlin.spring.event.PulsarSpringEvent;


@Configuration
@ComponentScan(VlinServerBootstrap.BASE_PACKAGE)
@PropertySource(VlinServerBootstrap.BASE_PROPERTIES)
public class VlinServerBootstrap {

	public static final String BASE_PACKAGE = "com.vlin";
	public static final String BASE_PROPERTIES = "classpath:application.properties";

	public static void main(String[] args) {

		ApplicationContext context = new AnnotationConfigApplicationContext(VlinServerBootstrap.class);
		context.publishEvent(new PulsarSpringEvent(context));
	}
}
